        <!DOCTYPE html>
        <html>
        <head>
                <meta charset="utf-8">
        <title>FrictionJointDef class / box2d Library / Dart Documentation</title>
        <link rel="stylesheet" type="text/css"
            href="../styles.css">
        <link href="http://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800" rel="stylesheet" type="text/css">
        <link rel="shortcut icon" href="../favicon.ico">
        
        </head>
        <body data-library="box2d" data-type="FrictionJointDef">
        <div class="page">
        <div class="header">
          <a href="../index.html"><div class="logo"></div></a>
          <a href="../index.html">Dart Documentation</a>
         &rsaquo; <a href="../box2d.html">box2d</a> &rsaquo; <a href="../box2d/FrictionJointDef.html">FrictionJointDef</a>        <div id="search-box">
          <input type="search" name="q" id="q" autocomplete="off"
              class="search-input" placeholder="Search API">
        </div>
        
      </div>
      <div class="drop-down" id="drop-down"></div>
      
        <div class="nav">
        
</div>
<div class="content">
        <h2><strong>FrictionJointDef</strong>
          class
        </h2>
        
<button id="show-inherited" class="show-inherited">Hide inherited</button>
<div class="doc">
<pre class="source">
class FrictionJointDef extends JointDef {
 /** The local anchor point relative to bodyA's origin. */
 final vec2 localAnchorA;

 /** The local anchor point relative to bodyB's origin. */
 final vec2 localAnchorB;

 /** The maximum friction force in N. */
 num maxForce;

 /** The maximum friction torque in N-m. */
 num maxTorque;

 FrictionJointDef()
     : super(),
       localAnchorA = new vec2.zero(),
       localAnchorB = new vec2.zero(),
       maxForce = 0.0,
       maxTorque = 0.0 {
   type = JointType.FRICTION;
 }

 void initialize(Body bA, Body bB, vec2 anchor) {
   bodyA = bA;
   bodyB = bB;
   bA.getLocalPointToOut(anchor, localAnchorA);
   bB.getLocalPointToOut(anchor, localAnchorB);
 }
}
</pre>
</div>
<h3>Extends</h3>
<p>
<span class="type-box"><span class="icon-class"></span><a href="../box2d/JointDef.html">JointDef</a></span>&nbsp;&gt;&nbsp;<span class="type-box"><span class="icon-class"></span><strong>FrictionJointDef</strong></span></p>
<div>
<h3>Constructors</h3>
<div class="method"><h4 id="FrictionJointDef">
<button class="show-code">Code</button>
new <strong>FrictionJointDef</strong>() <a class="anchor-link" href="#FrictionJointDef"
              title="Permalink to FrictionJointDef.FrictionJointDef">#</a></h4>
<div class="doc">
<pre class="source">
FrictionJointDef()
   : super(),
     localAnchorA = new vec2.zero(),
     localAnchorB = new vec2.zero(),
     maxForce = 0.0,
     maxTorque = 0.0 {
 type = JointType.FRICTION;
}
</pre>
</div>
</div>
</div>
<div>
<h3>Properties</h3>
<div class="field inherited"><h4 id="bodyA">
<button class="show-code">Code</button>
<a href="../box2d/Body.html">Body</a>         <strong>bodyA</strong> <a class="anchor-link"
            href="#bodyA"
            title="Permalink to FrictionJointDef.bodyA">#</a>
        </h4>
        <div class="inherited-from">inherited from <a href="../box2d/JointDef.html">JointDef</a> </div><div class="doc">
<pre class="source">
bodyA
</pre>
</div>
</div>
<div class="field inherited"><h4 id="bodyB">
<button class="show-code">Code</button>
<a href="../box2d/Body.html">Body</a>         <strong>bodyB</strong> <a class="anchor-link"
            href="#bodyB"
            title="Permalink to FrictionJointDef.bodyB">#</a>
        </h4>
        <div class="inherited-from">inherited from <a href="../box2d/JointDef.html">JointDef</a> </div><div class="doc">
<pre class="source">
bodyB
</pre>
</div>
</div>
<div class="field inherited"><h4 id="collideConnected">
<button class="show-code">Code</button>
bool         <strong>collideConnected</strong> <a class="anchor-link"
            href="#collideConnected"
            title="Permalink to FrictionJointDef.collideConnected">#</a>
        </h4>
        <div class="inherited-from">inherited from <a href="../box2d/JointDef.html">JointDef</a> </div><div class="doc">
<pre class="source">
collideConnected
</pre>
</div>
</div>
<div class="field"><h4 id="localAnchorA">
<button class="show-code">Code</button>
final <a href="../vector_math/vec2.html">vec2</a>         <strong>localAnchorA</strong> <a class="anchor-link"
            href="#localAnchorA"
            title="Permalink to FrictionJointDef.localAnchorA">#</a>
        </h4>
        <div class="doc">
<pre class="source">
localAnchorA
</pre>
</div>
</div>
<div class="field"><h4 id="localAnchorB">
<button class="show-code">Code</button>
final <a href="../vector_math/vec2.html">vec2</a>         <strong>localAnchorB</strong> <a class="anchor-link"
            href="#localAnchorB"
            title="Permalink to FrictionJointDef.localAnchorB">#</a>
        </h4>
        <div class="doc">
<pre class="source">
localAnchorB
</pre>
</div>
</div>
<div class="field"><h4 id="maxForce">
<button class="show-code">Code</button>
num         <strong>maxForce</strong> <a class="anchor-link"
            href="#maxForce"
            title="Permalink to FrictionJointDef.maxForce">#</a>
        </h4>
        <div class="doc">
<pre class="source">
maxForce
</pre>
</div>
</div>
<div class="field"><h4 id="maxTorque">
<button class="show-code">Code</button>
num         <strong>maxTorque</strong> <a class="anchor-link"
            href="#maxTorque"
            title="Permalink to FrictionJointDef.maxTorque">#</a>
        </h4>
        <div class="doc">
<pre class="source">
maxTorque
</pre>
</div>
</div>
<div class="field inherited"><h4 id="type">
<button class="show-code">Code</button>
int         <strong>type</strong> <a class="anchor-link"
            href="#type"
            title="Permalink to FrictionJointDef.type">#</a>
        </h4>
        <div class="inherited-from">inherited from <a href="../box2d/JointDef.html">JointDef</a> </div><div class="doc">
<pre class="source">
type
</pre>
</div>
</div>
<div class="field inherited"><h4 id="userData">
<button class="show-code">Code</button>
Object         <strong>userData</strong> <a class="anchor-link"
            href="#userData"
            title="Permalink to FrictionJointDef.userData">#</a>
        </h4>
        <div class="inherited-from">inherited from <a href="../box2d/JointDef.html">JointDef</a> </div><div class="doc">
<pre class="source">
userData
</pre>
</div>
</div>
</div>
<div>
<h3>Methods</h3>
<div class="method"><h4 id="initialize">
<button class="show-code">Code</button>
void <strong>initialize</strong>(<a href="../box2d/Body.html">Body</a> bA, <a href="../box2d/Body.html">Body</a> bB, <a href="../vector_math/vec2.html">vec2</a> anchor) <a class="anchor-link" href="#initialize"
              title="Permalink to FrictionJointDef.initialize">#</a></h4>
<div class="doc">
<pre class="source">
void initialize(Body bA, Body bB, vec2 anchor) {
 bodyA = bA;
 bodyB = bB;
 bA.getLocalPointToOut(anchor, localAnchorA);
 bB.getLocalPointToOut(anchor, localAnchorB);
}
</pre>
</div>
</div>
</div>
        </div>
        <div class="clear"></div>
        </div>
        <div class="footer">
          
        </div>
        <script async src="../client-live-nav.js"></script>
        </body></html>
        
